# ！ /usr/bin/python3
# -*- coding:utf-8 -*-
# @Author:Peng Cao
# @File: 07new_边缘检测.py
# @Software: PyCharm
import cv2.cv2 as cv
import matplotlib.pyplot as plt
import numpy as np


def img_Canny():
    """
    Canny边缘检测
    :return:
    """
    img = cv.imread('./data/lena.jpg', cv.IMREAD_GRAYSCALE)
    new_img = cv.Canny(img, 60, 150)
    new_img2 = cv.Canny(img, 70, 100)
    new_img3 = cv.Canny(img, 80, 90)
    new_img = np.hstack((new_img, new_img2, new_img3))
    cv.imshow("new_img", new_img)
    cv.waitKey(0)
    cv.destroyAllWindows()


if __name__ == '__main__':
    img_Canny()
